#coding:utf-8
from flask import Flask
from flask_wtf.csrf import CsrfProtect, generate_csrf
from flask_login import LoginManager
from flask_sqlalchemy import SQLAlchemy

app = Flask(__name__)
#调试开关
app.debug = True
#跨站访问攻击保护
csrf = CsrfProtect()
csrf.init_app(app)
app.secret_key = "sadlkfjaskhgipaskdf"
#登陆管理
lm = LoginManager()
lm.init_app(app)
lm.login_view = 'login'
#数据库
db = SQLAlchemy(app)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+mysqlconnector://yu:wanghaoyu@139.129.119.53:3306/schoolnet'

from app import views
